Hello,
Module m_CurMod = current Module
int rejected = 0
Object obj
Link lref
for obj in m_CurMod do
{
for lref in (obj) <- "*" do
{
bFound = true
rejected++
break;
}
}
m_lastBlsMod = load(m_CurMod, lastBaseline, false) //lastBaseline is a not-null baseline in the module
for obj in m_lastBlsMod do
{
for lref in (obj) <- "*" do
{
bFound = true
rejected++
break;
}
}
Simon@BM - Thu Oct 21 04:40:21 EDT 2010 |
Re: Not able to iterate links in beselined module
See this post. You need to do
LinkRef lr
for lr in all (o<-"*") do { ... }
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Not able to iterate links in beselined module Mathias Mamsch - Thu Oct 21 07:55:10 EDT 2010
See this post. You need to do
LinkRef lr
for lr in all (o<-"*") do { ... }
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Not able to iterate links in beselined module oddly, I have yet to deal with versioned links. But browsing some layout using some Wizard, I have the following code fragment that seems to work:
Link lnk
Module mDiscrep, mSource,
mLink = null
ModName_ mnSource = null
ModuleVersion mvSource = null
Object oDiscrep
for lnk in all(obj<-"*") do
{ mLink = module(lnk)
if (name(mLink) != "Discrepancy_Links") continue
mvSource = sourceVersion(lnk)
mnSource = module(mvSource)
if (null mnSource or isDeleted mnSource) continue
oDiscrep = source(lnk)
if (null oDiscrep) {
load(mvSource,false)
}
oDiscrep = source(lnk)
if (null oDiscrep or isDeleted oDiscrep) continue
<<< deal with good link>>>
}
|